/**
 * @copyright
 * ====================================================================
 * Copyright (c) 2006 Xiaoniu.org.  All rights reserved.
 *
 * This software is licensed as described in the file LICENSE, which
 * you should have received as part of this distribution.  The terms
 * are also available at http://code.google.com/p/suafe/.
 * If newer versions of this license are posted there, you may use a
 * newer version instead, at your option.
 *
 * This software consists of voluntary contributions made by many
 * individuals.  For exact contribution history, see the revision
 * history and logs, available at http://code.google.com/p/suafe/.
 * ====================================================================
 * @endcopyright
 */
package org.xiaoniu.suafe.reports;

import org.xiaoniu.suafe.beans.Document;
import org.xiaoniu.suafe.exceptions.AppException;

/**
 * Abstract Report class.
 * 
 * @author Shaun Johnson
 */
public abstract class GenericReport {

	protected Document document = null;

	/**
	 * Constructor that accepts Document object to be used as source for the report.
	 * 
	 * @param document Document object.
	 */
	public GenericReport(final Document document) {
		super();

		this.document = document;
	}

	/**
	 * Generate report and return report HTML contents as String.
	 * 
	 * @return Report HTML source.
	 * @throws AppException
	 */
	public abstract String generate() throws AppException;
}
